﻿<UserControl x:Class="SoftSource.Controls.DateRangeSelector"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls">
    <Grid x:Name="LayoutRoot">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>

        <Grid Grid.Row="0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <CheckBox Grid.Column="0"
                      x:Name="WeekCheckBox"
                      Content="This Week"
                      Margin="4"
                      Checked="WeekCheckBox_Checked" />
            <CheckBox Grid.Column="1"
                      x:Name="MonthCheckBox"
                      Content="This Month"
                      Margin="4"
                      Checked="MonthCheckBox_Checked" />
            <CheckBox Grid.Column="2"
                      x:Name="YearCheckBox"
                      Content="This Year"
                      Margin="4"
                      Checked="YearCheckBox_Checked" />
        </Grid>
        <Grid Grid.Row="1">
            <Grid.ColumnDefinitions>
                <ColumnDefinition />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>

            <StackPanel Grid.Column="0"
                        Margin="4">
                <TextBlock Text="Start:" />
                <controls:DatePicker x:Name="StartDatePicker"
                                     SelectedDate="{Binding StartDate, Mode=TwoWay}"
                                     Margin="3,0,0,0" />
            </StackPanel>
            <StackPanel Grid.Column="1"
                        Margin="4">
                <TextBlock Text="End:" />
                <controls:DatePicker x:Name="EndDatePicker"
                                     SelectedDate="{Binding EndDate, Mode=TwoWay}"
                                     Margin="3,0,0,0" />
            </StackPanel>
        </Grid>
    </Grid>
</UserControl>
